
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="${pageContext.request.contextPath }/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer ��Ϊ����ģ������ȥ-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="${pageContext.request.contextPath }/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript">

/*资讯-添加*/
function article_add(title,url,w,h){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
/*资讯-编辑*/
function article_edit(title,url,id,w,h){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
/*资讯-批量删除*/
function datadel_list(url){
	layer.confirm('确认要删除吗?',function(index){
		text = $("input:checkbox[name='message']:checked").map(function(index,elem) {
	            return $(elem).val();
	        }).get().join(',');
	        location = "${pageContext.request.contextPath }/"+url+"/deleteList?text="+text;		
	});
}

/*资讯-删除*/
function article_del(obj,id,url){
	layer.confirm('确认要删除吗?',function(index){
		$.ajax({
			type: 'POST',
			url: '${pageContext.request.contextPath }/'+url+'/delete?id='+id,
			dataType: 'json',
			success: function(data){
				$(obj).parents("tr").remove();
				layer.msg('已删除!',{icon:1,time:1000});
			},
			error:function(data) {
				console.log(data.msg);
			},
		});		
	});
}
</script> 
</body>
</html>